package com.zf.shuashua.manager;

import com.vise.xsnow.http.callback.ACallback;
import com.zf.shuashua.api.HttpData;
import com.zf.shuashua.api.Store;
import com.zf.shuashua.bean.BaseData;

/**
 * 记录用户ip
 */
public class LoginRecordManager {

    private static LoginRecordManager instance;

    private LoginRecordManager() {

    }

    public static LoginRecordManager getInstance() {
        if (null == instance) {
            synchronized (LoginRecordManager.class) {
                if (null == instance) {
                    instance = new LoginRecordManager();
                }
            }
        }
        return instance;
    }

    /**
     * 记录用户ip
     */
    public synchronized void loginRecord() {
//        if (!Store.getInstance().isLogin()) {
//            return;
//        }
        HttpData.getInstance().loginRecord(new ACallback<BaseData>() {
            @Override
            public void onSuccess(BaseData data) {

            }

            @Override
            public void onFail(int errCode, String errMsg) {
            }
        });
    }

}
